home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / FTP / Mirror2.3 / do_unlinks < prev    next >
Encoding:
Text File  |  1994-01-18  |  465 b   |  18 lines

  1. #!/usr/bin/perl -s
  2. # Obey the remove commands generated but not done by mirror.
  3. # eg:
  4. # NEED TO unlink /public/micros/ibmpc/simtel20/sprdsht/tc810.arc
  5. # NEED TO rmdir /public/micros/ibmpc/simtel20/sprdsht
  6.  
  7. # A simple safety check - only delete if the pathname begins with this
  8. $del_only = '/public';
  9.  
  10. while( <> ){
  11.     chop;
  12.     if( /^NEED TO (unlink|rmdir) ($del_only.*)/ ){
  13.         $zap = "$1('$2')";
  14.         print "$zap\n" if $debug;
  15.         (eval "$zap") || warn "failed: $zap\n";
  16.     }
  17. }
  18.